Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on enhancing compatibility with Rspack by eliminating direct Webpack imports and updating references to use the Rspack compiler instance. Additionally, it standardizes the testing utility alias in end-to-end tests, contributing to a more consistent and potentially future-proof codebase. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly removes the dynamic require('webpack') and migrates to using compiler.rspack. The updates in the test files to replace rstest with rs are also good. I've left a couple of comments on missed renames for consistency.
There was a problem hiding this comment.
Pull request overview
This PR removes the runtime require('webpack') fallback and standardizes on Rspack’s compiler namespace (compiler.rspack) across server internals and test helper plugins, while updating the test suite to use the newer rs test-runner global instead of rstest.
Changes:
- Remove
require('webpack')usage insrc/server.tsand usecompiler.rspackforEntryPlugin,ProvidePlugin, and HMR plugin handling. - Update test helper plugins/fixtures to use
compiler.rspack.sourcesandcompiler.rspack.Compilationconstants. - Migrate e2e tests from
rstest.*tors.*for mocks/spies/config.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/helpers/trusted-types-html-generator-plugin.js | Switches asset emission path to use compiler.rspack APIs when available. |
| tests/helpers/html-generator-plugin.js | Uses compiler.rspack.sources / compiler.rspack.Compilation for emitting HTML assets. |
| tests/fixtures/lazy-compilation-single-entry/webpack.config.js | Updates fixture plugin to use compiler.rspack asset APIs. |
| tests/fixtures/lazy-compilation-multiple-entries/webpack.config.js | Updates fixture plugin to use compiler.rspack asset APIs. |
| tests/e2e/web-socket-communication.test.js | Migrates rstest.setConfig to rs.setConfig. |
| tests/e2e/watch-files.test.js | Migrates spy helper from rstest to rs. |
| tests/e2e/stats.test.js | Migrates mock helper from rstest to rs. |
| tests/e2e/static-directory.test.js | Migrates spy helper from rstest to rs in the edited block. |
| tests/e2e/setup-exit-signals.test.js | Migrates several spies to rs (but leaves one rstest usage). |
| tests/e2e/server.test.js | Migrates spy helper from rstest to rs. |
| tests/e2e/overlay.test.js | Migrates mock helper from rstest to rs. |
| tests/e2e/hot-and-live-reload.test.js | Updates commented-out mock helper to rs (but leaves other rstest in comments). |
| tests/e2e/history-api-fallback.test.js | Migrates spy helper from rstest to rs. |
| tests/e2e/api.test.js | Migrates resetModules/mock helpers from rstest to rs. |
| src/server.ts | Removes require('webpack') fallback; uses compiler.rspack plugin constructors. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
compiler.webpackwithcompiler.rspackrsinstead ofrstest